#include "mdialog.h"
#include "ui_mdialog.h"

mDialog::mDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::mDialog)
{
    ui->setupUi(this);
}

mDialog::~mDialog()
{
    delete ui;
}

void mDialog::setArt(ArticleStruct ars1,ArticleStruct ars2)
{
    ui->tbAnn->append(ars1.Annotations.at(0));
    ui->tbArticle->setText(ars1.ArticleName);
    QString author1 = "";
    foreach(QString str, ars1.AuthorNames)
    {
        author1 += str;
    }
    ui->tbAuthor->setText(author1);
    ui->tbInfo->setText(ars1.JournalInfo);
    ui->tbJournal->setText(ars1.JournalName);

    ui->tbAnn_2->append(ars2.Annotations.at(0));
    ui->tbArticle_2->setText(ars2.ArticleName);
    QString author2 = "";
    foreach(QString str, ars2.AuthorNames)
    {
        author2 += str;
    }
    ui->tbAuthor_2->setText(author2);
//    ui->tbInfo_2->setText(ars2.JournalInfo);
    ui->tbJournal_2->setText(ars2.JournalName);
}
